import request from '@/router/axios';

// 获取列表
export const getList = (current, size, params) => {
  return request({
    url: '/api/hg-equipment/transfer/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 删除
export const remove = (id) => {
  return request({
    url: '/api/hg-equipment/transfer/remove',
    method: 'post',
    params: {
      id
    }
  })
}

// 保存
export const save = (data) => {
  return request({
    url: '/api/hg-equipment/transfer/save',
    method: 'post',
    data: data
  })
}

// 详情
export const detail = (id) => {
  return request({
    url: '/api/hg-equipment/transfer/info',
    method: 'get',
    params: {
      id
    }
  })
}

// 拉取设备验收单
export const pullAccept = (current, size, params) => {
  return request({
    url: '/api/hg-equipment/transfer/pullAccept',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 删除
export const removeUser = (noticeId) => {
  return request({
    url: '/api/hg-equipment/transfer/removeNotice',
    method: 'post',
    params: {
      noticeId
    }
  })
}

// 生成转固单
export const submit = (ids) => {
  return request({
    url: '/api/hg-equipment/transfer/fix',
    method: 'post',
    params: {
      ids
    }
  })
}